export interface IFMenuBase {
    key: string;
    title: string;
    icon?: string;
    component?: string;
    query?: string;
    requireAuth?: string;
    route?: string;
    /** 是否登录校验，true不进行校验（访客） */
    login?: boolean;
}

export interface IFMenu extends IFMenuBase {
    subs?: IFMenu[];
}

const menus: {
    menus: IFMenu[];
    others: IFMenu[] | [];
    [index: string]: any;
} = {
    menus: [
        // 菜单相关路由
        {
            key: '/app/dashboard/mounth',
            title: '数据板-月',
            icon: 'mobile',
            component: 'Dashboard',
            query: '?type=1',
        },
        {
            key: '/app/dashboard/day',
            title: '数据板-日',
            icon: 'mobile',
            component: 'Dashboard',
            query: '?type=2',
        },
        {
            key: '/app/history',
            title: '日志记录',
            icon: 'copy',
            subs: [{ key: '/app/history/dataLog', title: '数据日志', component: 'DataLogView' }],
        },
        {
            key: '/app/user',
            title: '用户管理',
            icon: 'copy',
            subs: [{ key: '/app/user/userList', title: '用户列表', component: 'UserListView' }],
        },
        {
            key: '/app/config',
            title: '配置管理',
            icon: 'copy',
            subs: [
                { key: '/app/config/dataStatus', title: '数据出境', component: 'SettingItemView' },
                {
                    key: '/app/config/commentConf',
                    title: 'comment配置',
                    component: 'SettingDataView',
                    query: '?type=comment_conf',
                },
                {
                    key: '/app/config/sensitivityConf',
                    title: '敏感度标签配置',
                    component: 'SettingDataView',
                    query: '?type=sensitivity_conf',
                },
                {
                    key: '/app/config/tokenComment',
                    title: 'tokenComment配置',
                    component: 'SettingDataView',
                    query: '?type=token_comment',
                },
            ],
        },
    ],
    others: [], // 非菜单相关路由
};

export default menus;
